The present invention relates to a transport generating apparatus for multiplexing video data and audio data and generating a transport stream corresponding to MPEG standard, and method thereof, and a program transmitting apparatus for transmitting a plurality of programs.
In recent years, a digital satellite broadcasting system and a cable broadcasting system that transmit compressed video signals corresponding to MPEG2 standard have been proposed and are being introduced all over the world. In the broadcasting world, DVB (Digital Video Broadcasting) standard proposed by an organization named DVB that was established for developing and standardizing a next-generation broadcasting system in Europe in around 1993 has become a defacto standard in digital broadcasting systems at the present time.
In the transmitting method corresponding to the DVB standard, video data and audio data contained in a program to be transmitted are encoded and thereby an encoded video stream and an encoded audio stream are generated. The encoded video stream and the encoded audio stream are converted into a transport stream that is transmitted. In other words, a transport stream is data of which an encoded video stream and an encoded audio stream are multiplexed.
To generate a transport stream of which an encoded video stream and an encoded audio stream have been multiplexed, a multiplexing unit that has an encoding function and a multiplexing function has been developed. In a conventional multiplexing unit, a video stream and a audio stream are multiplexed in a multiplexing period that is asynchronous with a frame period of the video stream and a frame period of the audio stream.
For example, when a video stream with a frame period of 33 msec and an audio stream with a frame period of 24 msec are multiplexed as shown in FIG. 13, in a conventional multiplexing unit, the video stream and the audio stream are multiplexed with the video frame period.
Next, with reference to FIG. 13, the conventional multiplexing process will be described. As shown in FIG. 13, in the first video frame period, an encoded video frame V1 encoded in the first video frame period and encoded audio streams A1 and A2 encoded in the first video frame period are multiplexed. In the second video frame period, an encoded video stream V2 encoded in the second video frame period and an encoded audio stream A3 encoded in the second video frame period are multiplexed. In each video frame, such a multiplexing process is repeated. Thus, as is clear from FIG. 13, the data amount of the first transport stream generated in the first video frame period is relatively large. In contrast, the data amount of the second transport stream T2 generated in the second video frame period is relatively small. In other words, in the conventional multiplexing process, the data amount of a transport stream generated varies in each video frame period.
To generate transport streams in such a manner that an STD (System Target Decoder) buffer of a decoder of a receiving unit that receives video streams and audio streams is prevented from overflowing, the conventional multiplexing unit that performs such a multiplexing process should perform simulations for the multiplexing process in various video frame periods. The STD buffer is a virtual buffer used to perform a decoding process for transport streams and to describe semantics of the transport streams.
Next, with reference to a flow chart shown in FIG. 14, a conventional process for generating a transport stream will be described.
At step S100, an encoded video stream V1 is received from a video encoder in the first video frame period. In addition, encoded audio streams A1 and A2 are received from an audio encoder in the first video period.
At step S101, before the encoded video stream V1 and the encoded audio streams A1 and A2 are multiplexed and a first transport stream T1 is generated in the first video frame period, one multiplexing schedule on which the video stream V1 and the audio streams A1 and A2 are multiplexed is planed.
At step S102, a transport stream is generated corresponding to the multiplexing schedule planed at step S101. A simulation is performed for determining whether or not the transport stream transmitted to a decoding unit causes a video STD buffer and an audio STD buffer of the decoder to overflow.
At step S103, corresponding to the result of the simulation, it is determined whether or not the video STD buffer and the audio STD buffer of the decoding unit overflow. When the determined result is Yes (namely, both the audio STD buffer and the video STD buffer do not overflow), the flow advances to step S104.
At step S104, the encoded video stream V1 and the encoded audio streams A1 and A2 are multiplexed corresponding to the multiplexing schedule planed at step S101.
At step S105, a first transport stream T1 is generated with the multiplexed streams.
When the determined result at step S103 is No (namely, the video STD buffer and the audio STD buffer of the decoding unit overflow), the flow returns to step S101. At step S101, another multiplexing schedule is planed. The steps S101, S102, and S103 are repeated until the determined result at step S103 becomes xe2x80x9cYesxe2x80x9d.
At step S106, xe2x80x9cnxe2x80x9d is incremented so as to generate a transport stream T2 in the second video frame period. Thereafter, the flow returns to step S100.
As is clear from the flow chart of the conventional transport generating process shown in FIG. 14, a process for planning a new multiplexing schedule and performing a simulation corresponding to the planed schedule should be performed in each video frame period. This is because the data amount of encoded video data and the data amount of encoded audio data vary in each video frame period as described in FIG. 13.
Moreover, in the simulating process, it is necessary to virtually determine whether the video STD buffer and the audio STD buffer overflow. Thus, the algorithm of the simulation becomes very complicated. Consequently, it takes a very long time to perform the simulation.
As described above, in the conventional unit, it takes a very long calculation time for processing transport streams. Thus, a supplied program cannot be multiplex-transmitted on real time basis. Especially, in digital satellite broadcasting systems and digital ground wave broadcasting systems, live programs are required to be transmitted on real time basis. However, in the transport generating algorithm of the conventional unit, it is difficult to transmit such live programs on real time basis.
The present invention is made from the above-described point of view. An object of the present invention is to generate a transport stream on real time basis in such a manner that an STD buffer of a decoding unit does not overflow.
In the transport stream generating apparatus according to the present invention, each of the data amount of an encoded video stream multiplexed in one video frame and the data amount of an encoded audio frame multiplexed in a predetermined period is almost constant in any video frame period. In addition, the data amount of a transport stream generated in one video frame period is almost constant in any video frame period.
Thus, the data amount of a transport stream that is output from the transport stream generating apparatus is constant in any frame period. Consequently, in the transport stream generating apparatus according to the present invention, it is not necessary to perform a simulation for determining whether or not a STD buffer of a decoding unit overflows. Thus, the transport stream generating apparatus according to the present invention can generate a transport stream faster than the conventional apparatus that requires a simulation. In addition, the apparatus according to the present invention can generate a transport stream on real time basis.
In the transport stream generating apparatus according to the present invention, schedule data for multiplexing an encoded video stream and an encoded audio stream is generated corresponding to a target video encoding rate and a target audio encoding rate. When an encoded video stream and an encoded audio stream are multiplexed corresponding to the generated schedule data and the multiplexed stream is transmitted as a transport stream to a decoding unit, the multiplexing process is performed in such a manner that the SDT buffer of the decoding unit does not overflow. Thus, in the transport stream generating apparatus according to the present invention, such schedule data is generated. In any video frame period, the multiplexing process is performed corresponding to the schedule data. Thus, the SDT buffer of the decoding unit is easily prevented from overflowing. In other words, unlike with the conventional apparatus, in the transport stream generating apparatus according to the present invention, it is not necessary to perform a complicated process such as a simulation corresponding to a planed schedule for each video frame.
In the transport stream generating apparatus according to the present invention, the schedule data is generated so that each of the data amount of an encoded video stream multiplexed in one video frame and the data amount of an encoded audio stream multiplexed in a predetermined period is almost constant in any video frame period and that the data amount of a transport stream generated in one video frame is almost constant in any video frame period. In other words, in the transport stream generating apparatus according to the present invention, the multiplexing process can be performed corresponding to the schedule data with preventing the STD buffer of the decoding unit from overflowing.
The first aspect of the present invention is a transport stream generating apparatus for generating a transport stream for transmitting source video data and source audio data, comprising an encoding means for encoding the source video data and the source audio data corresponding to an assigned video encoding rate and an assigned audio encoding rate so as to generate an encoded video stream and an encoded audio stream, respectively, a multiplexing means for multiplexing the encoded video stream and the encoded audio stream in each predetermined period, a transport stream generating means for generating the transport stream with the multiplexed stream of the video stream and the audio stream, and a controlling means for controlling the encoding means, the multiplexing means, and the transport stream generating means so that each of the data amount of the encoded video stream multiplexed in the predetermined period and the data amount of the encoded audio stream multiplexed in the predetermined period is almost constant in any predetermined period.
The second aspect of the present invention is a transport stream generating apparatus for generating a transport stream for transmitting source video data and source audio data, comprising an encoding means for encoding the source video data and the source audio data corresponding to an assigned video encoding rate and an assigned audio encoding rate so as to generate an encoded video stream and an encoded audio stream, respectively, a multiplexing means for multiplexing the encoded video stream and the encoded audio stream in each predetermined period, a transport stream generating means for generating the transport stream with the multiplexed stream of the video stream and the audio stream, and a controlling means for controlling the encoding means, the multiplexing means, and the transport stream generating means so that each of the data rate of the encoded video stream multiplexed as a transport stream in the predetermined period and the data rate of the encoded audio stream multiplexed as the transport stream in the predetermined period is almost constant in any predetermined period.
The third aspect of the present invention is a transport stream generating apparatus for generating a transport stream for transmitting source video data and source audio data, comprising an encoding means for encoding the source video data and the source audio data corresponding to an assigned video encoding rate and an assigned audio encoding rate so as to generate an encoded video stream and an encoded audio stream, respectively, a multiplexing means for multiplexing the encoded video stream and the encoded audio stream in each predetermined period, a transport stream generating means for generating the transport stream with the multiplexed stream of the video stream and the audio stream, and a controlling means for controlling the encoding means, the multiplexing means, and the transport stream generating means so that the data rate of the transport stream is almost constant in any predetermined period.
The fourth aspect of the present invention is a transport stream generating apparatus for generating a transport stream for transmitting source video data and source audio data, comprising a transport stream generating means for multiplexing the encoded video stream and the encoded audio stream in each predetermined period so as to generate the transport stream, a schedule generating means for generating a schedule for multiplexing an encoded video stream and an encoded audio stream corresponding to the assigned video encoding rate and the assigned audio encoding rate, and a controlling means for controlling the transport stream generating means so as to perform a multiplexing process corresponding to the multiplexing schedule in any predetermined period.
The fifth aspect of the present invention is a transport stream generating method for generating a transport stream with source video data and source audio data, comprising the steps of encoding the source video data and the source audio data corresponding to an assigned video encoding rate and an assigned audio encoding rate, respectively, multiplexing the encoded video stream and the encoded audio stream in each predetermined period so that the data amount of the multiplexed encoded video stream is almost constant in any predetermined period and that the data amount of the multiplexed encoded audio stream is almost constant in any predetermined period, and generating the transport stream with a multiplexed stream of the encoded video stream and the encoded audio stream.
The sixth aspect of the present invention is a transport stream generating method for generating a transport stream with source video data and source audio data, comprising the steps of encoding the source video data and the source audio data corresponding to an assigned video encoding rate and an assigned audio encoding rate, respectively, multiplexing the encoded video stream and the encoded audio stream in each predetermined period so that the data rate of the multiplexed encoded video stream is almost constant in any predetermined period and that the data rate of the multiplexed encoded audio stream is almost constant in any predetermined period, and generating the transport stream with the multiplexed stream of the encoded video stream and the encoded audio stream.
The seventh aspect of the present invention is a transport stream generating method for generating a transport stream with source video data and source audio data, comprising the steps of encoding the source video data and the source audio data corresponding to an assigned video encoding rate and an assigned audio encoding rate, respectively, and multiplexing the encoded video stream and the encoded audio stream and generating the transport stream so that the data rate of the transport stream is almost constant in any predetermined period.
The eighth aspect of the present invention is a transport stream generating method for generating a transport stream for transmitting source video data and source audio data, comprising the steps of generating a schedule for multiplexing an encoded video stream and an encoded audio stream corresponding to an assigned video encoding rate and an assigned audio encoding rate, encoding the source video data and the source audio data corresponding to the assigned video encoding rate and the assigned audio encoding rate, respectively, and multiplexing the encoded video stream and the encoded audio stream so as to perform a multiplexing process corresponding to the multiplexing schedule in any predetermined period and thereby generate the transport stream.
The ninth aspect of the present invention is a transport stream generating method for encoding source video data and source audio data and outputting the encoded ideo stream and the encoded audio stream as a transport stream, comprising the steps of deciding the data amount of the encoded video stream to be multiplexed in one video frame period and the data amount of the encoded audio stream to be multiplexed in one video frame period corresponding to an assigned target video encoding rate and an assigned target audio encoding rate, respectively, deciding a multiplexing schedule for multiplexing the encoded video stream and the encoded audio stream corresponding to the data amount of the encoded video stream to be multiplexed and the data amount of the encoded audio stream to be multiplexed, and multiplexing the encoded video stream and the encoded audio stream in any video frame period corresponding to the multiplexing schedule so as to output the transport stream.
The tenth aspect of the present invention is a program transmitting apparatus for transmitting a plurality of programs, comprising a plurality of encoding units for encoding a video stream and an audio stream contained in each of the programs, multiplexing the encoded video stream and the encoded audio stream, and outputting the multiplexed stream as a transport stream, a multiplexing unit for multiplexing a plurality of transport streams that are output from the plurality of encoding units, and a controller for controlling the plurality of encoding units and the multiplexing unit, wherein each of the plurality of encoding units generates a basic schedule for multiplexing an encoded video stream and an encoded audio stream in one video period corresponding to a video encoding rate and an audio encoding rate assigned by the controller and multiplexes the encoded video stream and the encoded audio stream in each frame period so as to generate the transport stream without need to perform a simulation for an encoder buffer.
The eleventh aspect of the present invention is a program transmitting apparatus for transmitting a plurality of programs, comprising a plurality of encoding units for encoding a video stream and an audio stream contained in each of the programs, multiplexing the encoded video stream and the encoded audio stream, and outputting the multiplexed stream as a transport stream, a multiplexing unit for multiplexing a plurality of transport streams that are output from the plurality of encoding units, and a controller for controlling the plurality of encoding units and the multiplexing unit, wherein each of the plurality of encoding units decides the data amount of an encoded video stream and the data amount of an encoded audio stream to be multiplexed in a predetermined multiplexing process period corresponding to an assigned video encoding rate and an assigned audio encoding rate, decides a multiplexing schedule for multiplexing the encoded video stream and the encoded audio stream corresponding to the data amount of the encoded video stream to be multiplexed and the data amount of the encoded audio stream to be multiplexed, and multiplexes the encoded video stream and the encoded audio stream corresponding to the multiplexing schedule in each predetermined multiplexing process period.